﻿
using SIS.Infrastructures.Context;
using SIS.Models.Users.Entities;
using SIS.Repositories.Common;

namespace SIS.Repositories.Users
{
    public class UserRepository : BaseRepository<UserInfoEntity>, IUserRepository
    {
        private readonly IDbContext _context;
        public UserRepository(IDbContext context) : base(context)
        {
            _context = context;
        }

        public UserInfoEntity GetUserInfoByName(string name)
        {
            return _context.Connection.Queryable<UserInfoEntity>().First(x => x.Name == name);
        }
    
    }
}
